package com.iflytek.iot.common.monitor;

import com.iflytek.iot.common.monitor.handler.MonitorContent;
import com.iflytek.iot.common.monitor.model.MonitorTask;

import java.util.function.Consumer;

/**
 * @author zurun
 * @date 2020/7/13 15:07:57
 */
public class MonitorRegister {
    private static MonitorEvent monitorEvent = new MonitorEvent();

    public static synchronized Consumer<MonitorTask> register(MonitorCallback monitorContent) {
        Consumer<MonitorTask> taskConsumer = MonitorContent.add(monitorContent);
//        taskConsumer.accept(null);
        return taskConsumer;
    }

    public void passiveReport() {
//        maps.get(null).passiveReport(a -> {
//            return true;
//        });
    }
}